package com.qf.springboot0406.controller;

import com.qf.springboot0406.entity.User;
import com.qf.springboot0406.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/hello")
public class HelloController {
    @Autowired
    UserService userService;
    @GetMapping("/get/{id}")
    public User getUSerById(@PathVariable("id") Integer id){
        return userService.getUSer(id);
    }

}
